package com.hc.controller;

import com.hc.jian.JianMapper;
import com.hc.nong.NongMapper;
import com.hc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

   @Autowired
    UserService userService;

    @GetMapping("transfer")
    public String transfer(int fromId, int toId, double monoey) {
        userService.transfer(fromId,toId,monoey);
        return "success";
    }


}
